import request from '@/utils/request'

export default {

  getPageList(pageNum, pageSize) {
    return request({
      url: `/rules/list/${pageNum}/${pageSize}`,
      method: 'get'
    })
  },
  addCost(obj) {
    return request({
      url: `/rules/addCost`,
      method: 'post',
      data: obj
    })
  },
  getCost(ruleId) {
    return request({
      url: `/rules/getCost/${ruleId}`,
      method: 'get'
    })
  },
  delCost(ruleIds) {
    return request({
      url: `/rules/delCost`,
      method: 'post',
      data: ruleIds
    })
  },
  submitApprove(obj) {
    return request({
      url: `/rules/submitApprove`,
      method: 'post',
      data: obj
    })
  },
  findApproval(ruleId) {
    return request({
      url: `/rules/findApproval/${ruleId}`,
      method: 'get'
    })
  },

  getPendingList(pageNum, pageSize) {
    return request({
      url: `/rules/getPendingList/${pageNum}/${pageSize}`,
      method: 'get'
    })
  },
  approve(obj) {
    return request({
      url: `/rules/approve`,
      method: 'post',
      data: obj
    })
  },
  addSign(obj) {
    return request({
      url: `/rules/addSign`,
      method: 'post',
      data: obj
    })
  }
}
